import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Login from '@/components/views/Login'
import Regist from '@/components/views/Regist'
import Manage from '@/components/views/Manage'
import MainP from '@/components/views/MainP'
import Fmk from '@/components/views/Fmk'
import Fck from '@/components/views/Fck'
import Home from '@/components/views/Home'
import myOrder from '@/components/views/myOrder'
import Check from '@/components/views/Check'
import Mohu from '@/components/views/mohu'

Vue.use(Router)

export default new Router({
  //去掉地址中的#
  mode: 'history',
   //高亮
   linkActiveClass: "active",
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/mohu',
      name: 'Mohu',
      component: Mohu
    },

    {
      path: '/Home',
      name: 'Home',
      component: Home,
    },
    {
      path: '/myOrder',
      name: 'myOrder',
      component: myOrder,
    },
    {
      path: '/manage',
      name: 'manage',
      component: Manage,
      meta:{
        needLogin:true
      }

    },
    {
      path: '/fmk',
      name: 'Fmk',
      component: Fmk
    },
    {
      path: '/fck',
      name: 'Fck',
      component: Fck
    },
    {
      path: '/check',
      name: 'Check',
      component: Check,
      meta:{
       needLogin1:true
      }
    },
    {
      path: '/',
      name: 'mainP',
      component: MainP,
      children:[
        {path:'login',component:Login},
        {path:'regist',component:Regist}
      ]
    }
    
  ]
})
